<template>
  <div class="bread-item">
    <router-link :to="to" v-if="to"> <slot></slot></router-link>
    <span v-else> <slot></slot></span>
    <i class="iconfont icon-angle-right"></i>
  </div>
</template>

<script setup>
import { defineProps } from 'vue'
defineProps({
  to: String
})
</script>

<style lang="scss" scoped>
.bread {
  display: flex;
  padding: 25px 10px;
  ::v-deep &-item {
    a {
      color: #666;
      transition: all 0.4s;
      &:hover {
        color: $xtxColor;
      }
    }
  }
  i {
    font-size: 12px;
    margin-left: 5px;
    margin-right: 5px;
    line-height: 22px;
  }
}
</style>
